package com.aldobucchi.graph.restrictionTree
{


	import com.aldobucchi.tree.TreeNode;


	/**
	 * 
	 * 
	 * Notes
	 * - isBound() not implemented yet
	 * - Negation ( ! ) should also be a node. Not implemented yet
	 * - Optional makes no sense in the context of faceting
	 * 
	 * Addition of more operators ( nodes ) may exceed the capacity of
	 * target evaluators. This is especially true about isBound()  ( negation should be easy )
	 * 
	 * @author 
	 * 
	 */
	public class RTNode extends TreeNode
	{
		
		
		/**
		 * 
		 * Returns the next arc that can be found by going up the tree.
		 * This can be used to presenta a label ( the name of the property being restricted )
		 * in the UI
		 * 
		 * @return 
		 * 
		 */		
		public function getFirstArcAbove( ):RTArcNode
		{
			
			if ( parent == null )
				return null;

			if ( parent is RTArcNode )
				return parent as RTArcNode;
		
			return ( parent as RTNode ).getFirstArcAbove( );					
		
		}
		
		
		
		public function RTNode( )
		{
			
		}
		
		

		override protected function shallowClone( ):TreeNode
		{
			return new RTNode( );	
		}		
		
		

		
	}
	
}

